<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .one {
            width: 300px;
            height: 300px;
            background-color: aqua;
        }

        .two {
            width: 300px;
            height: 300px;
            background-color: green;
            display: none;
        }
        .three {
            width: 300px;
            height: 300px;
            background-color: red;
            display: none;
        }
    </style>
    <script>
        window.onload = function () {
            document.querySelector('.content').onclick = function (event) {
                if(event.target.id=='one' || event.target.id=='two' || event.target.id=='three'){
                    var eles = document.querySelectorAll('.content div');
                    for (var e of eles) {
                        e.style.display = 'none';
                    }
                    document.querySelector('.'+event.target.id).style.display = 'block';
                }
            }
        }
    </script>
</head>

<body>
    <div class="content">
        <span id="one">one</span>
        <span id="two">two</span>
        <span id="three">three</span>

        <div class="one">one</div>
        <div class="two">two</div>
        <div class="three">three</div>
    </div>
</body>

</html>